import request from '@/utils/request'

// 添加产品
export function addProduct(data) {
  return request({
    url:'/tmall_springboot/products',
    method:'post',
    data:data,
  })
}

// 删除产品
export function deleteProduct(data) {
  return request({
    url:'/tmall_springboot/products/del',
    method:'post',
    data:data,
  })
}

// 列表
export function getProducts(params) {
  return request({
    url:'/tmall_springboot/categories/products',
    method:'get',
    params:params,
  })
}

// 更新产品
export function editProduct(data) {
  return request({
    url:'/tmall_springboot/products/update',
    method:'post',
    data:data,
  })
}
// 获取产品信息
export function getProduct(params) {
  return request({
    url:'/tmall_springboot/products',
    method:'get',
    params:params,
  })
}
